<?php
require_once '../../../wp-config.php';
require_once('exmashup.php');
try {
	switch ($_GET['modoOutput']) {
		case 'file':
			$oFeed = Rolando_Feed::getFeed(STRURLFEED,Rolando_Feed::PIPES);
			$aPipesItems = $oFeed->normalizzaFeed(NUMEROELEMENTILIVE);
			$strTesto = '<?php $strItems=<<<PIPES'.PHP_EOL.serialize($aPipesItems).PHP_EOL.'PIPES;'.PHP_EOL.';?>';
			if (count($aPipesItems)>0) {
				$fhFeed = fopen(STRNOMEBUFFERFILE,"w");
				fwrite($fhFeed,$strTesto);
				fclose($fhFeed);
			}
			break;
		case 'return':
			echo include_buffer();
			break;
	}			
} catch (Exception $e) {
	//nothing;
}